package reno.market.mainmarket.warframemarket.entity;

import javax.persistence.*;
import java.util.Objects;

@Entity
@Table(name = "warframemarket", schema = "warframemarket")
public class WarframemarketEO {
    private String id;
    private String itemEn;
    private String itemCn;
    private String url;
    private Integer ducats;
    private String drops;

    @Id
    @Column(name = "id")
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    @Basic
    @Column(name = "item_en")
    public String getItemEn() {
        return itemEn;
    }

    public void setItemEn(String itemEn) {
        this.itemEn = itemEn;
    }

    @Basic
    @Column(name = "item_cn")
    public String getItemCn() {
        return itemCn;
    }

    public void setItemCn(String itemCn) {
        this.itemCn = itemCn;
    }

    @Basic
    @Column(name = "url")
    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    @Basic
    @Column(name = "ducats")
    public Integer getDucats() {
        return ducats;
    }

    public void setDucats(Integer ducats) {
        this.ducats = ducats;
    }

    @Basic
    @Column(name = "drops")
    public String getDrops() {
        return drops;
    }

    public void setDrops(String drops) {
        this.drops = drops;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        WarframemarketEO that = (WarframemarketEO) o;
        return Objects.equals(id, that.id) &&
                Objects.equals(itemEn, that.itemEn) &&
                Objects.equals(itemCn, that.itemCn) &&
                Objects.equals(url, that.url) &&
                Objects.equals(ducats, that.ducats) &&
                Objects.equals(drops, that.drops);
    }

    @Override
    public int hashCode() {

        return Objects.hash(id, itemEn, itemCn, url, ducats, drops);
    }
}
